package cn.iocoder.yudao.module.game.dal.mysql.withdrawnRecord;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.game.dal.dataobject.withdrawnRecord.WithdrawnRecordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.game.controller.admin.withdrawnRecord.vo.*;

/**
 * 待提现 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface WithdrawnRecordMapper extends BaseMapperX<WithdrawnRecordDO> {

    default PageResult<WithdrawnRecordDO> selectPage(WithdrawnRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WithdrawnRecordDO>()
                .likeIfPresent(WithdrawnRecordDO::getMemberId, String.valueOf(reqVO.getMemberId()))
                .eqIfPresent(WithdrawnRecordDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(WithdrawnRecordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WithdrawnRecordDO::getId));
    }

}